<?xml version="1.0"?>

<f:view
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
>
	<h:head />
	<h:body>
		<p:dataTable id="searchResults" var="search" value="#{library.searchBookList}" widgetVar="searchList" emptyMessage="Sorry!!! Currently there are no entries" paginator="true" rows="10" rowsPerPageTemplate="5" sortBy="#{search.bookTitle}" styleClass="table">
			<f:facet name="header">
				<h:outputText value="Available Book Listings"/>
			</f:facet>
			<p:separator/>
			<p:column id="bookTitle" headerText="Book Title">
				<h:outputText value="#{search.bookTitle}"/>
			</p:column>
			<p:column id="bookAuthor" headerText="Author">
				<h:outputText value="#{search.author}"/>
			</p:column>
			<p:column id="creationDate" headerText="Book added on">
				<h:outputText value="#{search.createDate}"/>
			</p:column>
			<p:column id="optionsMenu" headerText="Actions">
				<ui:include src="editOptions.xhtml"></ui:include>
			</p:column>
		</p:dataTable>
	</h:body>
</f:view>